<?php
// src/Asiah/SiklusBundle/Entity/Bookmark.php
namespace Asiah\SiklusBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * @ORM\Entity(repositoryClass="Asiah\SiklusBundle\Repository\BookmarkRepository")
 * @ORM\Table(name="bookmark")
 */

class Bookmark {
	public function __construct(){
		$this->benci = 0;
		$this->suka = 0;
		$this->lihat = 0;
		$this->tanggal_dibuat = new \DateTime();

	}
	/**
	 * @ORM\Id
	 * @ORM\Column(type="integer")
	 * @ORM\GeneratedValue(strategy="AUTO")
	 */
	protected $id;
	/**
	 * @ORM\Column(type="string", nullable=true)
	 */
	protected $judul;
	/**
	 * @ORM\Column(type="string", nullable=true)
	 */
	protected $deskripsi;
	/**
	 * @ORM\Column(type="string", nullable=true)
	 */
	protected $custom_url;
	/**
	 * @ORM\Column(type="date")
	 */
	protected $tanggal_dibuat;
	/**
	 * @ORM\Column(type="integer")
	 */
	protected $suka;
	/**
	 * @ORM\Column(type="integer")
	 */
	protected $benci;
	/**
	 * @ORM\Column(type="integer")
	 */
	protected $lihat;
	/**
	 * @ORM\ManyToOne(targetEntity="Link", inversedBy="bookmarks")
	 * @ORM\JoinColumn(name="link_id", referencedColumnName="id")
	 */
	protected $link;
	/**
	 * @ORM\ManyToMany(targetEntity="Label", inversedBy="bookmarks")
	 * @ORM\JoinTable(name="bookmark_labels")
	 */
	protected $labels;
	/**
	 * Get id
	 *
	 * @return integer 
	 */
	public function getId()
	{
		return $this->id;
	}

	/**
	 * Set judul
	 *
	 * @param string $judul
	 */
	public function setJudul($judul)
	{
		$this->judul = $judul;
	}

	/**
	 * Get judul
	 *
	 * @return string 
	 */
	public function getJudul()
	{
		return $this->judul;
	}

	/**
	 * Set deskripsi
	 *
	 * @param string $deskripsi
	 */
	public function setDeskripsi($deskripsi)
	{
		$this->deskripsi = $deskripsi;
	}

	/**
	 * Get deskripsi
	 *
	 * @return string 
	 */
	public function getDeskripsi()
	{
		return $this->deskripsi;
	}

	/**
	 * Set custom_url
	 *
	 * @param string $customUrl
	 */
	public function setCustomUrl($customUrl)
	{
		$this->custom_url = $customUrl;
	}

	/**
	 * Get custom_url
	 *
	 * @return string 
	 */
	public function getCustomUrl()
	{
		return $this->custom_url;
	}

	/**
	 * Set tanggal_dibuat
	 *
	 * @param date $tanggalDibuat
	 */
	public function setTanggalDibuat($tanggalDibuat)
	{
		$this->tanggal_dibuat = $tanggalDibuat;
	}

	/**
	 * Get tanggal_dibuat
	 *
	 * @return date 
	 */
	public function getTanggalDibuat()
	{
		return $this->tanggal_dibuat;
	}

	/**
	 * Set suka
	 *
	 * @param integer $suka
	 */
	public function setSuka($suka)
	{
		$this->suka = $suka;
	}

	/**
	 * Get suka
	 *
	 * @return integer 
	 */
	public function getSuka()
	{
		return $this->suka;
	}

	/**
	 * Set benci
	 *
	 * @param integer $benci
	 */
	public function setBenci($benci)
	{
		$this->benci = $benci;
	}

	/**
	 * Get benci
	 *
	 * @return integer 
	 */
	public function getBenci()
	{
		return $this->benci;
	}

	/**
	 * Set lihat
	 *
	 * @param integer $lihat
	 */
	public function setLihat($lihat)
	{
		$this->lihat = $lihat;
	}

	/**
	 * Get lihat
	 *
	 * @return integer 
	 */
	public function getLihat()
	{
		return $this->lihat;
	}

	/**
	 * Set link
	 *
	 * @param Asiah\SiklusBundle\Entity\Link $link
	 */
	public function setLink(\Asiah\SiklusBundle\Entity\Link $link)
	{
		$this->link = $link;
	}

	/**
	 * Get link
	 *
	 * @return Asiah\SiklusBundle\Entity\Link 
	 */
	public function getLink()
	{
		return $this->link;
	}

    /**
     * Add labels
     *
     * @param Asiah\SiklusBundle\Entity\Label $labels
     */
    public function addLabel(\Asiah\SiklusBundle\Entity\Label $labels)
    {
        $this->labels[] = $labels;
    }

    /**
     * Get labels
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getLabels()
    {
        return $this->labels;
    }
}